<?php
session_start();
if (!isset($_SESSION['nowa'])) {
	session_regenerate_id();
	$_SESSION['block'] = false;
	$_SESSION['nowa'] = true;
	$_SESSION['adresuzytkownika'] = $_SERVER['REMOTE_ADDR'];
}

if($_SESSION['adresuzytkownika'] != $_SERVER['REMOTE_ADDR']) {
	session_destroy();
}
error_reporting(E_ALL & ~E_NOTICE);

$_SESSION['zalogowany'] = false;
unset($_SESSION['zalogowany']);
session_destroy();
header("Location: logowanie.php");
exit(0);
?>